#!/bin/sh
if [ "$#" == "3" ]; then
  find . -name Makefile -exec ./update-release \{} $* \;
else
  if [ "$#" == "4" ]; then
    cat $1 | sed -e s/^MAJOR.*\$/MAJOR\ =\ $2/ -e s/^MINOR.*\$/MINOR\ =\ $3/ -e s/^REVISION.*\$/REVISION\ =\ $4/ > $1
  else
    echo "Syntax: $0 <major> <minor> <revision>"
  fi
fi
